/**
 * @description 全局样式
 */

@charset "utf-8";

@import './normalize.scss';
@import './transition.scss';
@import './loading.scss';
$base: '.vab';

@mixin scrollbar {
  max-height: 88vh;
  margin-bottom: 0.5vh;
  overflow-y: auto;

  &::-webkit-scrollbar {
    width: 0;
    height: 0;
    background: transparent;
  }

  &::-webkit-scrollbar-thumb {
    background-color: rgba(144, 147, 153, 0.3);
    border-radius: 10px;
  }

  &::-webkit-scrollbar-thumb:hover {
    background-color: rgba(144, 147, 153, 0.3);
  }
}

@mixin base-scrollbar {
  &::-webkit-scrollbar {
    width: 13px;
    height: 13px;
  }

  &::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.4);
    background-clip: padding-box;
    border: 3px solid transparent;
    border-radius: 7px;
  }

  &::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.5);
  }

  &::-webkit-scrollbar-track {
    background-color: transparent;
  }

  &::-webkit-scrollbar-track:hover {
    background-color: #f8fafc;
  }
}

img {
  object-fit: cover;
}

a {
  color: $base-color-blue;
  text-decoration: none;
  cursor: pointer;
}

* {
  // transition: $base-transition;
}

svg {
  transition: none;

  * {
    transition: none;
  }
}

html {
  body {
    position: relative;
    height: 100vh;
    padding: 0;
    margin: 0;
    font-family: Avenir, Helvetica, Arial, sans-serif;
    font-size: $base-font-size-default;
    color: #2c3e50;
    background: #f6f8f9;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    @include base-scrollbar;

    div {
      @include base-scrollbar;
    }

    svg,
    i {
      &:hover {
        opacity: 0.8;
      }
    }

    .v-modal {
      backdrop-filter: blur(10px);
    }

    .el-tag+.el-tag {
      margin-left: 10px;
    }

    .editor-toolbar {

      .no-mobile,
      .fa-question-circle {
        display: none;
      }
    }

    .el-divider--horizontal {
      margin: 10px 0 25px 0;

      .el-divider__text {
        display: -webkit-box;
        overflow: hidden;
        text-overflow: ellipsis;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
      }
    }

    .el-image-viewer {
      &__close {
        .el-icon-circle-close {
          color: $base-color-white;
        }
      }
    }

    .vue-admin-beautiful-wrapper {
      .app-main-container {
        @include base-scrollbar;

        >[class*='-container'] {
          * {
            transition: none;
          }

          padding: $base-padding;
          background: $base-color-white;
          box-sizing: border-box;
        }
      }
    }

    /* 进度条开始 */
    #nprogress {
      position: fixed;
      z-index: $base-z-index;

      .bar {
        background: $base-color-blue !important;
      }

      .peg {
        box-shadow: 0 0 10px $base-color-blue, 0 0 5px $base-color-blue !important;
      }
    }

    .el-table {
      border-left: 1px solid #cbcccd;
      border-right: 1px solid #cbcccd;

      .el-table__body-wrapper {
        @include base-scrollbar;
      }

      th {
        background: #f5f7fa;
      }

      td,
      th {
        position: relative;
        box-sizing: border-box;
        padding: 8px 0;

        .cell {
          font-size: $base-font-size-default;
          font-weight: normal;
          color: #606266;
          height: .4rem;
          line-height: .4rem;
          padding: 0 auto !important;

          .el-image {
            display: block;
            width: .36rem;
            height: .36rem;
            border-radius: $base-border-radius;
            margin: auto 0;
          }
        }
      }

      // th {
      //   .cell {
      //     font-size: 16px;
      //     line-height: 40px;
      //   }

      // }

    }

    .el-pagination {
      padding: .02rem .2rem;
      margin: .15rem 0 0 0;
      font-weight: normal;
      color: $base-color-black;
      text-align: right;
      span{
        font-size: .13rem !important;
        height: .28rem !important;
        line-height: .28rem !important;
        min-width: .35.5rem !important;
      }
      button{
        font-size: 0.14rem !important;
        height: .28rem !important;
        line-height: .28rem !important;
        min-width: .3rem !important;
      }
      .el-pager li{
        font-size: .13rem;
        height: .28rem !important;
        line-height: .28rem !important;
        min-width: .3rem !important;
      }
      .el-pagination__jump{
        margin-left: .24rem !important;
      }
      .el-pagination__editor.el-input .el-input__inner{
        font-size: .13rem !important;
      }
    }

    .el-menu.el-menu--popup.el-menu--popup-right-start {
      @include scrollbar;
    }

    .el-menu.el-menu--popup.el-menu--popup-bottom-start {
      @include scrollbar;
    }

    .el-submenu__title i {
      color: $base-color-white;
    }

    .el-dialog,
    .el-message-box {
      &__body {
        border-top: 1px solid $base-border-color;
        background-color: #f5f5f5;
        max-height: 45vh;
        overflow: auto;

        .el-form {
          padding: 0 .5rem;

          .el-form-item {
            margin: auto;
            margin-bottom: .18rem;
          }
        }
      }

      .add-main-tital {
        display: flex;
        font-size: .18rem;
        border-left: .10rem solid rgb(121, 189, 255);
        padding-left: .10rem;

        h4 {
          margin: 0 !important;
        }
      }

      &__header {
        text-align: left;
        padding: .10rem !important;
        background-color: rgb(233, 243, 255);
      }

      &__headerbtn {
        top: .15rem !important;
      }

      &__footer {
        padding: $base-padding;
        text-align: right;
        border-top: 1px solid $base-border-color;



        ::v-deep {
          .el-button {
            padding: .1rem .2rem !important;
          }

          .el-button--primary {
            background-color: rgb(33, 113, 212) !important;
          }
        }
      }

      &__content {
        padding: .2rem;
        font-size: .14rem !important;
      }
    }

    .el-card {
      margin-bottom: .15rem;

      &__body {
        padding: $base-padding;
      }
    }

    .select-tree-popper {
      .el-scrollbar {
        .el-scrollbar__view {
          .el-select-dropdown__item {
            height: auto;
            max-height: 2.74rem;
            padding: 0;
            overflow-y: auto;
            line-height: 0.26rem;
            font-size: .14rem !important;
          }
        }
      }
    }
  }
}